<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .body {
        min-height: 3000px;
    }
    .container {
        display: flex;
    }

    .main {
        height: 1000px;
        width: 700px;
        background-color: pink;
    }

    .right {
        position: fixed;
        top: 50%;
        transform: translate(0,-50%);
        width: 50px;
        height: 70px;
        background-color: skyblue;
    }
</style>

<body>
    <div class="container">
        <div class="main">

        </div>
        <div class="right">

        </div>
    </div>
</body>

</html>